﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WPFCABShell.$safeprojectname$.Services.StatusBar
{
	/// <summary>
	/// Provides services related to the application status bar.
	/// </summary>
	/// <remarks>
	/// <para>
	/// The status bar service allows modules to manipulate the application status bar. Client code does so by starting an operation.
	/// Once an operation is started, the <see cref="IStatusBarOperation"/> instance returned can be used to manipulate the status bar.
	/// When an operation is complete, the client code should simply dispose of the <see cref="IStatusBarOperation"/> object.
	/// </para>
	/// <para>
	/// The status bar service supports prioritization to ensure that the status bar is utilized as effectively as possible by a potentially
	/// large number of clients at the same time.
	/// </para>
	/// </remarks>
	public interface IStatusBarService
	{
		/// <summary>
		/// Occurs whenever the primary message changes.
		/// </summary>
		event EventHandler<MessageEventArgs> MessageChanged;

		/// <summary>
		/// Occurs whenever the secondary message changes.
		/// </summary>
		event EventHandler<MessageEventArgs> SecondaryMessageChanged;

		/// <summary>
		/// Occurs whenever the ternary message changes.
		/// </summary>
		event EventHandler<MessageEventArgs> TernaryMessageChanged;

		/// <summary>
		/// Occurs whenever progress information changes.
		/// </summary>
		event EventHandler<ProgressEventArgs> ProgressChanged;

		/// <summary>
		/// Begins a message operation of normal priority.
		/// </summary>
		/// <returns>
		/// The <see cref="IMessageOperation"/>.
		/// </returns>
		IMessageOperation BeginMessageOperation();

		/// <summary>
		/// Begins a message operation of a specified priority.
		/// </summary>
		/// <param name="priority">
		/// The desired priority.
		/// </param>
		/// <returns>
		/// The <see cref="IMessageOperation"/>.
		/// </returns>
		IMessageOperation BeginMessageOperation(StatusPriority priority);

		/// <summary>
		/// Begins a secondary message operation of normal priority.
		/// </summary>
		/// <returns>
		/// The <see cref="IMessageOperation"/>.
		/// </returns>
		IMessageOperation BeginSecondaryMessageOperation();

		/// <summary>
		/// Begins a secondary message operation of a specified priority.
		/// </summary>
		/// <param name="priority">
		/// The desired priority.
		/// </param>
		/// <returns>
		/// The <see cref="IMessageOperation"/>.
		/// </returns>
		IMessageOperation BeginSecondaryMessageOperation(StatusPriority priority);

		/// <summary>
		/// Begins a ternary message operation of normal priority.
		/// </summary>
		/// <returns>
		/// The <see cref="IMessageOperation"/>.
		/// </returns>
		IMessageOperation BeginTernaryMessageOperation();

		/// <summary>
		/// Begins a ternary message operation of a specified priority.
		/// </summary>
		/// <param name="priority">
		/// The desired priority.
		/// </param>
		/// <returns>
		/// The <see cref="IMessageOperation"/>.
		/// </returns>
		IMessageOperation BeginTernaryMessageOperation(StatusPriority priority);

		/// <summary>
		/// Begins a progress operation of normal priority.
		/// </summary>
		/// <returns>
		/// The <see cref="IProgressOperation"/>.
		/// </returns>
		IProgressOperation BeginProgressOperation();

		/// <summary>
		/// Begins a progress operation of a specified priority.
		/// </summary>
		/// <param name="priority">
		/// The desired priority.
		/// </param>
		/// <returns>
		/// The <see cref="IProgressOperation"/>.
		/// </returns>
		IProgressOperation BeginProgressOperation(StatusPriority priority);

		/// <summary>
		/// Ends a specified operation.
		/// </summary>
		/// <param name="operation">
		/// The operation to end.
		/// </param>
		void EndOperation(IStatusBarOperation operation);
	}
}
